package me.cxlr.shaopinghelper.resource;

import me.cxlr.shaopinghelper.MyApplication;
import me.cxlr.shaopinghelper.R;
import me.cxlr.shaopinghelper.constants.Constants;

/**
 * 获取文字资源
 *
 * @author ShanLunZhi
 */
public class Resource {
    public static String getResourceCurrentThemeMsg(int theme) {
        String str;
        // 跟随系统
        if (theme == Constants.SETTING_THEME_BY_SYSTEM) {
            str = MyApplication.getInstance().getString(R.string.settings_theme_by_system);
        }
        // 浅色模式
        else if (theme == Constants.SETTING_THEME_DAY) {
            str = MyApplication.getInstance().getString(R.string.settings_theme_day);
        }
        // 深色模式
        else if (theme == Constants.SETTING_THEME_NIGHT) {
            str = MyApplication.getInstance().getString(R.string.settings_theme_night);
        } else {
            str = MyApplication.getInstance().getString(R.string.settings_theme_by_system);
        }
        return str;
    }

    public static String getShaoPingMode(int mode) {
        String str;
        // 电子书模式
        if (mode == Constants.SETTING_MODE_EBOOK) {
            str = MyApplication.getInstance().getString(R.string.settings_mode_ebook);
        }
        // 某音模式
        else if (mode == Constants.SETTING_MODE_ZJDY) {
            str = MyApplication.getInstance().getString(R.string.settings_mode_zjdy);
        } else {
            str = MyApplication.getInstance().getString(R.string.settings_mode_ebook);
        }
        return str;
    }
}
